home *** CD-ROM | disk | FTP | other *** search
Wrap
XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss((((3333XXXX)))) NNNNAAAAMMMMEEEE XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss - Converts from real-world dimensions to pixels SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS #include <Xm/XmP.h> XXXXmmmmIIIImmmmppppoooorrrrttttOOOOppppeeeerrrraaaattttoooorrrr XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss( WWWWiiiiddddggggeeeetttt wwwwiiiiddddggggeeeetttt, iiiinnnntttt ooooffffffffsssseeeetttt, XXXXttttAAAArrrrggggVVVVaaaallll ****vvvvaaaalllluuuueeee); VVVVEEEERRRRSSSSIIIIOOOONNNN This page documents Motif 2.1. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss converts a horizontal distance from a real-world dimensional unit (such as thousandths of an inch) to pixels. This conversion is based on the horizontal resolution of the screen. The choice of real-world dimensional unit is stored in the XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeeeresource. For example, suppose that _w_i_d_g_e_t has an XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeee resource value of XXXXmmmm1111000000000000TTTTHHHH____IIIINNNNCCCCHHHHEEEESSSS. If the input _v_a_l_u_e were 2000 (meaning 2000/1000 inches or 2 inches), then XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss determines how many horizontal pixels fall within 2 inches. Because different screens have different resolutions, the returned _v_a_l_u_e might be 160 pixels on one screen and 200 pixels on another. XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss is an XXXXmmmmIIIImmmmppppoooorrrrttttPPPPrrrroooocccc. Typically, your widget will call this function from a synthetic resource record. _w_i_d_g_e_t Specifies the widget containing the resource named by _o_f_f_s_e_t. _o_f_f_s_e_t Specifies the offset (in bytes) of a synthetic resource field in the widget record. _v_a_l_u_e Specifies a value in the XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeee real-world dimensional units used by _w_i_d_g_e_t and returns a value in pixels. RRRREEEETTTTUUUURRRRNNNN Returns one of the following XXXXmmmmIIIImmmmppppoooorrrrttttOOOOppppeeeerrrraaaattttoooorrrr values: XXXXmmmmSSSSYYYYNNNNTTTTHHHHEEEETTTTIIIICCCC____NNNNOOOONNNNEEEE The caller of the XXXXmmmmIIIImmmmppppoooorrrrttttPPPPrrrroooocccc is not responsible for copying the converted _v_a_l_u_e into the resource specified by _o_f_f_s_e_t. Page 1 (printed 4/6/01) XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss((((3333XXXX)))) XXXXmmmmSSSSYYYYNNNNTTTTHHHHEEEETTTTIIIICCCC____LLLLOOOOAAAADDDD The caller of the XXXXmmmmIIIImmmmppppoooorrrrttttPPPPrrrroooocccc is responsible for copying the converted _v_a_l_u_e into the resource specified by _o_f_f_s_e_t. Motif's synthetic resource mechanism is typically the caller of XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss. Therefore, if XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss returns XXXXmmmmSSSSYYYYTTTTHHHHEEEETTTTIIIICCCC____LLLLOOOOAAAADDDD, Motif synthetic resource mechanism will take care of copying (and casting) _v_a_l_u_e into the resource symbolized by _o_f_f_s_e_t. RRRREEEELLLLAAAATTTTEEEEDDDD XXXXmmmmeeeeFFFFrrrroooommmmHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss(3), XXXXmmmmeeeeFFFFrrrroooommmmVVVVeeeerrrrttttiiiiccccaaaallllPPPPiiiixxxxeeeellllssss(3), and XXXXmmmmeeeeTTTTooooVVVVeeeerrrrttttiiiiccccaaaallllPPPPiiiixxxxeeeellllssss(3). Page 2 (printed 4/6/01)